﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<ProjectDirector.Domain.Entities.Contact>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    ContactList
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<h2>ContactList</h2>

<p>
    <%: Html.ActionLink("Create New", "Create") %>
</p>
<table>
    <tr>
        <th>
            CustomerId
        </th>
        <th>
            TitleId
        </th>
        <th>
            FirstName
        </th>
        <th>
            LastName
        </th>
        <th>
            JobTitleId
        </th>
        <th>
            PhoneNumber
        </th>
        <th>
            MobileNumber
        </th>
        <th>
            Email
        </th>
        <th>
            CreatedBy
        </th>
        <th>
            DateCreated
        </th>
        <th>
            UpdatedBy
        </th>
        <th>
            DateUpdated
        </th>
        <th>
            IsDeleted
        </th>
        <th>
            Notes
        </th>
        <th></th>
    </tr>

<% foreach (var item in Model) { %>
    <tr>
        <td>
            <%: Html.DisplayFor(modelItem => item.CustomerId) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.TitleId) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.FirstName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.LastName) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.JobTitleId) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.PhoneNumber) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.MobileNumber) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Email) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.CreatedBy) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.DateCreated) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.UpdatedBy) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.DateUpdated) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.IsDeleted) %>
        </td>
        <td>
            <%: Html.DisplayFor(modelItem => item.Notes) %>
        </td>
        <td>
            <%: Html.ActionLink("Edit", "Edit", new { id=item.ContactId }) %> |
            <%: Html.ActionLink("Details", "Details", new { id=item.ContactId }) %> |
            <%: Html.ActionLink("Delete", "Delete", new { id=item.ContactId }) %>
        </td>
    </tr>
<% } %>

</table>

</asp:Content>
